import Vue from 'vue'
import Vuex from 'vuex'
import createLogger from 'vuex/dist/logger'
import products from './modules/products'
import water from './modules/water'
import electrical from './modules/electrical'
import park from './modules/park'
import phone from './modules/phone'
import alert from './modules/alert'
import pm from './modules/pm25'
import stree from './modules/stree'

Vue.use(Vuex)

const debug = process.env.NODE_ENV !== 'production'

export default new Vuex.Store({
  modules: {
    products,
    water,
    electrical,
    park,
    phone,
    alert,
    pm,
    stree
  },
  strict: debug,
  plugins: debug ? [createLogger()] : []
})
